package com.sat.goods.feign;

import com.sat.goods.pojo.GoodsVo;
import entity.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;


@FeignClient("goods")
@RequestMapping("/goods")
public interface GoodsFeign {

    @RequestMapping("/rollBackSkuStock")
    public Result<Integer> rollBackSkuStock(@RequestParam("id")Long id,@RequestParam("num")Integer num);

    @GetMapping(value = "/{id}")
    public Result<GoodsVo> findById(@PathVariable Long id);

    @RequestMapping("/updateSkuNum/")
    public Result<Integer> updateSkuNum(@RequestParam("id")Long id, @RequestParam("num")Integer num);

}
